package demo1;

//public class Animal {
//    public int age=12;
//}
//
//class Dog extends Animal{
//    public int age=10;
//
//}

public class Animal{
    public Animal (){
        System.out.println("执行构造方法");
    }
    {
        System.out.println("执行实例代码块");
    }
    static {
        System.out.println("执行静态代码块");
    }

    public static void main(String[] args) {
        Animal an=new Animal();
        {
            System.out.println("执行普通代码块");
        }
    }
}